-
Notifications
You must be signed in to change notification settings - Fork 5.9k
refactor(tests): migrate from mocha to jest #2564
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Okay from quick research seems like there are some things we can try:
Link to google search |
This PR is on the wrong base @jsjoeio |
Oops, fixed. |
e104339
to
66f4029
Compare
Once/if CI passes, I will sign older commits and clean them up. |
aa0cf17
to
a1e4e9d
Compare
Seeing some weird errors in release. Possible solution: stackoverflow Hmm...this error seems to occur a lot and relates to mismatched versions (i.e. @types/jest uses a TS feature that isn't in your TS version). I'm going to try to upgrade TS to 4.1.
UPDATE: even after upgrading TypeScript to the latest version, I'm still seeing the same errors. UPDATE: so this error is happening because of |
That's bizarre, why is the release process trying to build jest? cc @code-asher |
Modify the tsconfig.json in lib/vscode/src/build. This adds the flag skipLibCheck: true to tell TypeScript to not type-check the declaration files at build time. We need to add this because otherwise it checks the declaration files and reports an error of duplicate type definitions because we use Jest for our tests and they use Mocha and they both use the global namespace "test" in their .d.ts files.
fedbe58
to
1f0d80d
Compare
lib/vscode/extensions/typescript-language-features/src/utils/platform.ts
Outdated
Show resolved
Hide resolved
d52ed61
to
883dd13
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
bdb8b0e
to
3044224
Compare
This migrates the testing solution from mocha to jest. We were using some deprecated mocha methods in our tests so those are fixed now.
#2621 was merged into this and includes code-coverage
Screenshot
TODOS
Related: